package com.neiquan.secondhand.po;

import com.neiquan.backstage.core.PO;
import com.neiquan.backstage.core.bsc.CRUD;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.security.KeyStore;
import java.util.Date;

/**
 * 收货地址表
 *  chenjunnan 
 *  2016/7/21.
 */
@Entity
@org.hibernate.annotations.Entity(selectBeforeUpdate = true, dynamicUpdate = true)
@Table(name = "sh_address")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@CRUD
public class Address extends PO  {
	 @Override
	    public Serializable getId() {
	        return null;
	    }
    @Id
    @GeneratedValue(generator = "generator")
    @GenericGenerator(name = "generator", strategy = "uuid.hex")
    
    @Column(name = "id", unique = true, nullable = false)
    private String id;//主键
    
    @Column(name = "userid", length=200,nullable = false)
    private String userid;//
    
    @Column(name = "address", length=500)
    private String address;//地址
    
    @Column(name = "telephone", length=11)
    private String telephone;//手机号

    @Column(name = "email",length=200)
    private String email;//邮箱
    
    @Column(name = "ifdefault",length=1)
    private Integer ifdefault;//是否默认地址（0：否，1：是）

    @Column(name = "flag",length = 1)
    private Integer flag;//删除状态 0：删除，1：正常

    @Column(name = "create_time")
    private  Long createTime;//创建时间

    @Column(name = "update_time")
    private  Long update_time;//修改时间；
    
    
   
	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Integer getIfdefault() {
		return ifdefault;
	}

	public void setIfdefault(Integer ifdefault) {
		this.ifdefault = ifdefault;
	}

	public Integer getFlag() {
		return flag;
	}

	public void setFlag(Integer flag) {
		this.flag = flag;
	}

	public Long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Long createTime) {
		this.createTime = createTime;
	}

	public Long getUpdate_time() {
		return update_time;
	}

	public void setUpdate_time(Long update_time) {
		this.update_time = update_time;
	}

	public void setId(String id) {
		this.id = id;
	}

   

}
